package com.yao.form;

import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * User: 姚宏武
 * Date: 2017/11/20
 * Time: 13:21
 * Email：401369870@qq.com
 * Description: 前台创建订单时传递的数据
 *
     name: "张三"
     phone: "18868822111"
     address: "慕课网总部"
     openid: "ew3euwhd7sjw9diwkq" //用户的微信openid
     items: [{
         productId: "1423113435324",
         productQuantity: 2 //购买数量
     }]
 *
 */
@Data
public class OrderForm {
    /**
     * 买家姓名
     */
    @NotEmpty(message = "姓名必填")
    private String name;
    /**
     * 买家手机号
     */
    @NotEmpty(message = "手机号必填")
    private String phone;
    /**
     * 买家地址
     */
    @NotEmpty(message = "地址必填")
    private String address;
    /**
     * 买家微信openid
     */
    @NotEmpty(message = "openid必填")
    private String openid;
    /**
     * 购物车
     */
    @NotEmpty(message = "购物车不能为空")
    private String items;
}
